﻿@model IEnumerable<Identity.Models.AppUser>
@{
    ViewBag.Title = "Index";
}

<div class="panel panel-primary">
    <div class="panel-heading">
        User Accounts
    </div>
    <table class="table table-striped">

        <tr><th>ID</th><th>Name</th><th>Email</th></tr>
        @if (Model.Count() == 0)
        {
            <tr><td colspan="3" class="text-center">No User Accounts</td></tr>
        }
        else
        {
            foreach (var user in Model)
            {
                <tr>
                    <td>@user.Id</td>
                    <td>@user.UserName</td>
                    <td>@user.Email</td>
                    <td>
                        @Html.ActionLink("Edit", "Edit", new { id = user.Id },
                                    new { @class = "btn btn-primary btn-xs" })
                        @Html.ActionLink("Delete", "Delete", new { id = user.Id },
                                    new { @class = "btn btn-primary btn-xs" })
                    </td> 
                </tr>
            }
        }
    </table>
</div>
@Html.ActionLink("Create", "Create", null, new { @class = "btn btn-primary" })
